import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex);

export default new Vuex.Store({
    state: {
        cityName: "广州",
        cityId: "440100",
        user: {
            login: 0,
            username: "",
        }
    },
    mutations: {
        updataCity(state, step) {
            state.cityName = step.cityName;
            state.cityId = step.cityId;
        },
        loginName(state, step) {
            state.user.login = step.login;
            state.user.username = step.username;
        },
    },
    actions: {},
})